#pragma once
#include "lynxi_base.h"
#include <map>

namespace ev
{

    class LynxiModel : public EVBaseLynxiModel, public EVLynxiModel
    {
      public:
        LynxiModel();

        ~LynxiModel();
        // init model and infos
        EVStatus Init(const char *net, void **config) override;

        EVStatus UnInit() override;
        // run inference
        EVStatus Infer(EVModelData *in, EVModelData *out) override;

        EVStatus SetIO(const std::vector<std::string> &inputs, const std::vector<std::string> &outputs) override;

        EVStatus OptimizeModel(const char *model_name) override;

      private:
        lynRunMode_t m_run_mode;
        lynModelDesc_t *m_model_desc{nullptr};
        lynContext_t m_ctx = nullptr;
        lynStream_t m_stream = nullptr;
        std::vector<std::string> m_input_names;
        std::vector<std::string> m_output_names;
        void *m_host_outputs{nullptr};
        void *m_dev_inputs{nullptr};
        void *m_dev_outputs{nullptr};
    };

} // namespace ev